<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class template basic_managed_shared_memory</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../interprocess/indexes_reference.html#header.boost.interprocess.managed_shared_memory_hpp" title="Header &lt;boost/interprocess/managed_shared_memory.hpp&gt;">
<link rel="prev" href="wmanaged_mapped_file.html" title="Type definition wmanaged_mapped_file">
<link rel="next" href="managed_shared_memory.html" title="Type definition managed_shared_memory">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="wmanaged_mapped_file.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../interprocess/indexes_reference.html#header.boost.interprocess.managed_shared_memory_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="managed_shared_memory.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.interprocess.basic_managed_sha_idm27088"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template basic_managed_shared_memory</span></h2>
<p>boost::interprocess::basic_managed_shared_memory</p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../interprocess/indexes_reference.html#header.boost.interprocess.managed_shared_memory_hpp" title="Header &lt;boost/interprocess/managed_shared_memory.hpp&gt;">boost/interprocess/managed_shared_memory.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CharType<span class="special">,</span> <span class="keyword">typename</span> AllocationAlgorithm<span class="special">,</span> 
         <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">IndexConfig</span> <span class="special">&gt;</span> <span class="keyword">class</span> IndexType<span class="special">&gt;</span> 
<span class="keyword">class</span> <a class="link" href="basic_managed_sha_idm27088.html" title="Class template basic_managed_shared_memory">basic_managed_shared_memory</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// <a class="link" href="basic_managed_sha_idm27088.html#boost.interprocess.basic_managed_sha_idm27088construct-copy-destruct">construct/copy/destruct</a></span>
  <a class="link" href="basic_managed_sha_idm27088.html#idm27108-bb"><span class="identifier">basic_managed_shared_memory</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="basic_managed_sha_idm27088.html#idm27111-bb"><span class="identifier">basic_managed_shared_memory</span></a><span class="special">(</span><a class="link" href="create_only_t.html" title="Struct create_only_t">create_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">,</span> 
                              <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> 
                              <span class="keyword">const</span> <a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> <span class="special">=</span> <a class="link" href="permissions.html" title="Class permissions">permissions</a><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="basic_managed_sha_idm27088.html#idm27129-bb"><span class="identifier">basic_managed_shared_memory</span></a><span class="special">(</span><a class="link" href="open_or_create_t.html" title="Struct open_or_create_t">open_or_create_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">,</span> 
                              <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> 
                              <span class="keyword">const</span> <a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> <span class="special">=</span> <a class="link" href="permissions.html" title="Class permissions">permissions</a><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="../container/static_vector.html#idm27147-bb"><span class="identifier">basic_managed_shared_memory</span></a><span class="special">(</span><a class="link" href="open_copy_on_write_t.html" title="Struct open_copy_on_write_t">open_copy_on_write_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="special">,</span> 
                              <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="basic_managed_sha_idm27088.html#idm27158-bb"><span class="identifier">basic_managed_shared_memory</span></a><span class="special">(</span><a class="link" href="open_read_only_t.html" title="Struct open_read_only_t">open_read_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="special">,</span> 
                              <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="basic_managed_sha_idm27088.html#idm27169-bb"><span class="identifier">basic_managed_shared_memory</span></a><span class="special">(</span><a class="link" href="open_only_t.html" title="Struct open_only_t">open_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="basic_managed_sha_idm27088.html#idm27180-bb"><span class="identifier">basic_managed_shared_memory</span></a><span class="special">(</span><a class="link" href="create_only_t.html" title="Struct create_only_t">create_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">,</span> 
                              <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> 
                              <span class="keyword">const</span> <a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> <span class="special">=</span> <a class="link" href="permissions.html" title="Class permissions">permissions</a><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="basic_managed_sha_idm27088.html#idm27199-bb"><span class="identifier">basic_managed_shared_memory</span></a><span class="special">(</span><a class="link" href="open_or_create_t.html" title="Struct open_or_create_t">open_or_create_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">,</span> 
                              <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> 
                              <span class="keyword">const</span> <a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> <span class="special">=</span> <a class="link" href="permissions.html" title="Class permissions">permissions</a><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="basic_managed_sha_idm27088.html#idm27218-bb"><span class="identifier">basic_managed_shared_memory</span></a><span class="special">(</span><a class="link" href="open_copy_on_write_t.html" title="Struct open_copy_on_write_t">open_copy_on_write_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span><span class="special">,</span> 
                              <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="basic_managed_sha_idm27088.html#idm27230-bb"><span class="identifier">basic_managed_shared_memory</span></a><span class="special">(</span><a class="link" href="open_read_only_t.html" title="Struct open_read_only_t">open_read_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span><span class="special">,</span> 
                              <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="basic_managed_sha_idm27088.html#idm27242-bb"><span class="identifier">basic_managed_shared_memory</span></a><span class="special">(</span><a class="link" href="open_only_t.html" title="Struct open_only_t">open_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="basic_managed_sha_idm27088.html#idm27254-bb"><span class="identifier">basic_managed_shared_memory</span></a><span class="special">(</span><a class="link" href="basic_managed_sha_idm27088.html" title="Class template basic_managed_shared_memory">basic_managed_shared_memory</a> <span class="special">&amp;&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="basic_managed_sha_idm27088.html" title="Class template basic_managed_shared_memory">basic_managed_shared_memory</a> <span class="special">&amp;</span> <a class="link" href="basic_managed_sha_idm27088.html#idm27260-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="basic_managed_sha_idm27088.html" title="Class template basic_managed_shared_memory">basic_managed_shared_memory</a> <span class="special">&amp;&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="basic_managed_sha_idm27088.html#idm27105-bb"><span class="special">~</span><span class="identifier">basic_managed_shared_memory</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="basic_managed_sha_idm27088.html#idm27097-bb">public member functions</a></span>
  <span class="keyword">void</span> <a class="link" href="basic_managed_sha_idm27088.html#idm27098-bb"><span class="identifier">swap</span></a><span class="special">(</span><a class="link" href="basic_managed_sha_idm27088.html" title="Class template basic_managed_shared_memory">basic_managed_shared_memory</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="basic_managed_sha_idm27088.html#idm27268-bb">public static functions</a></span>
  <span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="basic_managed_sha_idm27088.html#idm27269-bb"><span class="identifier">grow</span></a><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="basic_managed_sha_idm27088.html#idm27278-bb"><span class="identifier">shrink_to_fit</span></a><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="basic_managed_sha_idm27088.html#idm27285-bb"><span class="identifier">grow</span></a><span class="special">(</span><span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="basic_managed_sha_idm27088.html#idm27295-bb"><span class="identifier">shrink_to_fit</span></a><span class="special">(</span><span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.17.17.3.37.3.4"></a><h2>Description</h2>
<p>A basic shared memory named object creation class. Initializes the shared memory segment. Inherits all basic functionality from basic_managed_memory_impl&lt;CharType, AllocationAlgorithm, IndexType&gt;*<span style="color: red">&lt;zwj&gt;&lt;/zwj&gt;</span>/ </p>
<div class="refsect2">
<a name="id-1.3.17.17.3.37.3.4.3"></a><h3>
<a name="boost.interprocess.basic_managed_sha_idm27088construct-copy-destruct"></a><code class="computeroutput">basic_managed_shared_memory</code> 
        public
       construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="idm27108-bb"></a><span class="identifier">basic_managed_shared_memory</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Default constructor. Does nothing. Useful in combination with move semantics </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm27111-bb"></a><span class="identifier">basic_managed_shared_memory</span><span class="special">(</span><a class="link" href="create_only_t.html" title="Struct create_only_t">create_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> name<span class="special">,</span> <span class="identifier">size_type</span> size<span class="special">,</span> 
                            <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> addr <span class="special">=</span> <span class="number">0</span><span class="special">,</span> 
                            <span class="keyword">const</span> <a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> perm <span class="special">=</span> <a class="link" href="permissions.html" title="Class permissions">permissions</a><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>
<p>Creates shared memory and creates and places the segment manager. This can throw. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm27129-bb"></a><span class="identifier">basic_managed_shared_memory</span><span class="special">(</span><a class="link" href="open_or_create_t.html" title="Struct open_or_create_t">open_or_create_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> name<span class="special">,</span> 
                            <span class="identifier">size_type</span> size<span class="special">,</span> <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> addr <span class="special">=</span> <span class="number">0</span><span class="special">,</span> 
                            <span class="keyword">const</span> <a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> perm <span class="special">=</span> <a class="link" href="permissions.html" title="Class permissions">permissions</a><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>
<p>Creates shared memory and creates and places the segment manager if segment was not created. If segment was created it connects to the segment. This can throw. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm27147-bb"></a><span class="identifier">basic_managed_shared_memory</span><span class="special">(</span><a class="link" href="open_copy_on_write_t.html" title="Struct open_copy_on_write_t">open_copy_on_write_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> name<span class="special">,</span> 
                            <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> addr <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span></pre>
<p>Connects to a created shared memory and its segment manager. in copy_on_write mode. This can throw. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm27158-bb"></a><span class="identifier">basic_managed_shared_memory</span><span class="special">(</span><a class="link" href="open_read_only_t.html" title="Struct open_read_only_t">open_read_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> name<span class="special">,</span> 
                            <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> addr <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span></pre>
<p>Connects to a created shared memory and its segment manager. in read-only mode. This can throw. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm27169-bb"></a><span class="identifier">basic_managed_shared_memory</span><span class="special">(</span><a class="link" href="open_only_t.html" title="Struct open_only_t">open_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> name<span class="special">,</span> 
                            <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> addr <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span></pre>
<p>Connects to a created shared memory and its segment manager. This can throw. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm27180-bb"></a><span class="identifier">basic_managed_shared_memory</span><span class="special">(</span><a class="link" href="create_only_t.html" title="Struct create_only_t">create_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> name<span class="special">,</span> 
                            <span class="identifier">size_type</span> size<span class="special">,</span> <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> addr <span class="special">=</span> <span class="number">0</span><span class="special">,</span> 
                            <span class="keyword">const</span> <a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> perm <span class="special">=</span> <a class="link" href="permissions.html" title="Class permissions">permissions</a><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>
<p>Creates shared memory and creates and places the segment manager. This can throw.</p>
<p>Note: This function is only available on operating systems with native wchar_t APIs (e.g. Windows). </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm27199-bb"></a><span class="identifier">basic_managed_shared_memory</span><span class="special">(</span><a class="link" href="open_or_create_t.html" title="Struct open_or_create_t">open_or_create_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> name<span class="special">,</span> 
                            <span class="identifier">size_type</span> size<span class="special">,</span> <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> addr <span class="special">=</span> <span class="number">0</span><span class="special">,</span> 
                            <span class="keyword">const</span> <a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> perm <span class="special">=</span> <a class="link" href="permissions.html" title="Class permissions">permissions</a><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>
<p>Creates shared memory and creates and places the segment manager if segment was not created. If segment was created it connects to the segment. This can throw.</p>
<p>Note: This function is only available on operating systems with native wchar_t APIs (e.g. Windows). </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm27218-bb"></a><span class="identifier">basic_managed_shared_memory</span><span class="special">(</span><a class="link" href="open_copy_on_write_t.html" title="Struct open_copy_on_write_t">open_copy_on_write_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> name<span class="special">,</span> 
                            <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> addr <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span></pre>
<p>Connects to a created shared memory and its segment manager. in copy_on_write mode. This can throw.</p>
<p>Note: This function is only available on operating systems with native wchar_t APIs (e.g. Windows). </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm27230-bb"></a><span class="identifier">basic_managed_shared_memory</span><span class="special">(</span><a class="link" href="open_read_only_t.html" title="Struct open_read_only_t">open_read_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> name<span class="special">,</span> 
                            <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> addr <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span></pre>
<p>Connects to a created shared memory and its segment manager. in read-only mode. This can throw.</p>
<p>Note: This function is only available on operating systems with native wchar_t APIs (e.g. Windows). </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm27242-bb"></a><span class="identifier">basic_managed_shared_memory</span><span class="special">(</span><a class="link" href="open_only_t.html" title="Struct open_only_t">open_only_t</a><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> name<span class="special">,</span> 
                            <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> addr <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span></pre>
<p>Connects to a created shared memory and its segment manager. This can throw.</p>
<p>Note: This function is only available on operating systems with native wchar_t APIs (e.g. Windows). </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm27254-bb"></a><span class="identifier">basic_managed_shared_memory</span><span class="special">(</span><a class="link" href="basic_managed_sha_idm27088.html" title="Class template basic_managed_shared_memory">basic_managed_shared_memory</a> <span class="special">&amp;&amp;</span> moved<span class="special">)</span><span class="special">;</span></pre>
<p>Moves the ownership of "moved"'s managed memory to *this. Does not throw </p>
</li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="basic_managed_sha_idm27088.html" title="Class template basic_managed_shared_memory">basic_managed_shared_memory</a> <span class="special">&amp;</span> <a name="idm27260-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="basic_managed_sha_idm27088.html" title="Class template basic_managed_shared_memory">basic_managed_shared_memory</a> <span class="special">&amp;&amp;</span> moved<span class="special">)</span><span class="special">;</span></pre>
<p>Moves the ownership of "moved"'s managed memory to *this. Does not throw </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm27105-bb"></a><span class="special">~</span><span class="identifier">basic_managed_shared_memory</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Destroys *this and indicates that the calling process is finished using the resource. The destructor function will deallocate any system resources allocated by the system for use by this process for this resource. The resource can still be opened again calling the open constructor overload. To erase the resource from the system use remove(). </p>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.17.17.3.37.3.4.4"></a><h3>
<a name="idm27097-bb"></a><code class="computeroutput">basic_managed_shared_memory</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="idm27098-bb"></a><span class="identifier">swap</span><span class="special">(</span><a class="link" href="basic_managed_sha_idm27088.html" title="Class template basic_managed_shared_memory">basic_managed_shared_memory</a> <span class="special">&amp;</span> other<span class="special">)</span><span class="special">;</span></pre>
<p>Swaps the ownership of the managed shared memories managed by *this and other. Never throws. </p>
</li></ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.17.17.3.37.3.4.5"></a><h3>
<a name="idm27268-bb"></a><code class="computeroutput">basic_managed_shared_memory</code> public static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="idm27269-bb"></a><span class="identifier">grow</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> shmname<span class="special">,</span> <span class="identifier">size_type</span> extra_bytes<span class="special">)</span><span class="special">;</span></pre>
<p>Tries to resize the managed shared memory object so that we have room for more objects.</p>
<p>This function is not synchronized so no other thread or process should be reading or writing the file </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="idm27278-bb"></a><span class="identifier">shrink_to_fit</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> shmname<span class="special">)</span><span class="special">;</span></pre>
<p>Tries to resize the managed shared memory to minimized the size of the file.</p>
<p>This function is not synchronized so no other thread or process should be reading or writing the file </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="idm27285-bb"></a><span class="identifier">grow</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> shmname<span class="special">,</span> <span class="identifier">size_type</span> extra_bytes<span class="special">)</span><span class="special">;</span></pre>
<p>Tries to resize the managed shared memory object so that we have room for more objects.</p>
<p>This function is not synchronized so no other thread or process should be reading or writing the file</p>
<p>Note: This function is only available on operating systems with native wchar_t APIs (e.g. Windows). </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="idm27295-bb"></a><span class="identifier">shrink_to_fit</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">wchar_t</span> <span class="special">*</span> shmname<span class="special">)</span><span class="special">;</span></pre>
<p>Tries to resize the managed shared memory to minimized the size of the file.</p>
<p>This function is not synchronized so no other thread or process should be reading or writing the file</p>
<p>Note: This function is only available on operating systems with native wchar_t APIs (e.g. Windows). </p>
</li>
</ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2005-2015 Ion Gaztanaga<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="wmanaged_mapped_file.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../interprocess/indexes_reference.html#header.boost.interprocess.managed_shared_memory_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="managed_shared_memory.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
